package client;

import java.net.ServerSocket;
import comum.Client;
import controle.RequestManager;

public class FtpClient {
	
	public static Client client;
	protected static ServerSocket listenSocket;
	
	/**
	 * Aqui e minha classe main do cliente. Instancio a classe Connect, que faz a primeira conexao com o servidor, 
	 * e chamo a primeira de dados do servidor
	 * @param args e o parametro de ip do servidor destino
	 */
	public static void main(String[] args) {
		
		System.out.println("********************************************************************************");
		System.out.println("****************************** FTP SO CLIENT ***********************************");
		System.out.println("********************************************************************************");	
		String ipServidor = null;
		if(args[0] != null)
			 ipServidor = args[0];
		else
			System.out.println("Preciso do parametro do ip do servidor");
		if(ipServidor.length() == 0)
		{
			System.out.println("Preciso do parametro do ip do servidor");
			return;
		}
		else
		{
			Connect conn = new Connect(ipServidor);
			client = conn.getClientInfo();
			client.setIpServer(args[0]);
			RequestManager request = new RequestManager();
			request.initialUpdateList();
		}
	}
}